package j05fanxing;

class Dog{
    public static <T> void f1(T t){
        System.out.println("t = " + t);
    }
    //K kind
    /*
    K - key kind
    T - type
    V - value
    E - element
    //...
     */
    public <K> void f2(K k){
        System.out.println("k = " + k);
    }
}

public class J2fangfa {
    public static void main(String[] args) {
        Dog.<String>f1("abc");
        Dog.f1("xyz");

        new Dog().f2("ww");
        new Dog().<String>f2("ww");
        new Dog().f2(45);
        new Dog().<Integer>f2(45);
    }
}

class Bird<K,T,V>{
    K k1;
    T t1;
    V v1;
}
class BirdTest{
    public static void main(String[] args) {
        Bird<Byte,Integer,String> b1 = new Bird<>();
        b1.k1 = 3;
        b1.v1 = "abc";
    }
}

class Array1<K>{
    void printArr(K[] arr){
        for (int i = 0; i < arr.length; i++) {
            System.out.println(arr[i]);
        }
    }

    static <T> void printArr2(T[] arr){

    }
}

class Array1Test{
    public static void main(String[] args) {
        Array1<String> array1 = new Array1<>();
        array1.printArr(new String[]{"aa","bb","cc"});
    }
}